package net.viralpatel.struts2;

import java.sql.ResultSet;
import java.sql.SQLException;

import com.opensymphony.xwork2.ActionSupport;

public class ShowAction  extends ActionSupport{
	JDBCQuery jdbc;
	ResultSet rs;
	private String roomID;
	private String phong;
	private String tang;
	private String kaidan;
	public String execute(){		
		try {
			jdbc=new JDBCQuery();
			rs=jdbc.getRoomID(phong, tang, kaidan);
			while(rs.next())
			{
				setRoomID(roomID);
			}
			
		} catch (ClassNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		return SUCCESS;
				
	}
	public String getPhong() {
		return phong;
	}
	public void setPhong(String phong) {
		this.phong = phong;
	}
	public String getTang() {
		return tang;
	}
	public void setTang(String tang) {
		this.tang = tang;
	}
	public String getKaidan() {
		return kaidan;
	}
	public void setKaidan(String kaidan) {
		this.kaidan = kaidan;
	}
	public String getRoomID() {
		return roomID;
	}
	public void setRoomID(String roomID) {
		this.roomID = roomID;
	}
}
